package com.fare.taluo.application.plane.income;

import java.util.Date;
import java.util.List;

import com.fare.taluo.core.domain.config.line.OccupRateEntity;
import com.fare.taluo.vo.core.OccupRateEntityVO;

public interface OccupRateApplication {

	/**
	 * 删除一个客座率
	 * @param id
	 * @throws Exception
	 */
	public void deleteOccupRateEntity(long id) throws Exception;

	/**
	 * 保存或更新一个客座率
	 * @param ore
	 * @throws Exception
	 */
	public void saveOrUpdateOccupRateEntity(OccupRateEntityVO ore) throws Exception;

	/**
	 * @param companyId
	 * @param lineCode
	 * @param flightDay
	 * @param page
	 * @param pagesize
	 * @return
	 */
	public List<OccupRateEntityVO> findOccupRateByConsdions(String companyId, String lineCode, Date flightDay, int page,
			int pagesize);

	/**
	 * 
	 * @param companyId
	 * @param lineCode
	 * @param flightDay
	 * @return
	 */
	public int getTotalOccupRateListByCodition(String companyId, String fromCity,String toCity, Date flightDay);
	
	/**
	 * 根据航班号 ，航班起飞时间找出客座率的数据
	 * @param flightno
	 * @param flightDay
	 * @return
	 */
	public OccupRateEntityVO findOccupRateEntityVO(String flightno,String flightDay);
	
	/**
	 * 根据时间段查询客座率
	 * @param flightinfo
	 * @param beginFlightDay
	 * @param endFlightDay
	 * @return
	 */
	public List<OccupRateEntityVO> findOccupRateEntityByCondition(String flightinfo, Date beginFlightDay,Date endFlightDay);
	
	/**
	 * 根据时间段查询客座率
	 * @param flightinfo
	 * @param beginFlightDay
	 * @param endFlightDay
	 * @return
	 */
	public List<OccupRateEntityVO> findOccupRateEntityByCondition(String companyCode, String flightDay);
	
	/**
	 * 根据时间段查询客座率
	 * @param flightinfo
	 * @param beginFlightDay
	 * @param endFlightDay
	 * @return
	 */
	public List<OccupRateEntityVO> findOccupRateCondition2(String linkCode, String flightDay);
	
	/**
	 * 航空公司、起发城市、终点城市、时间 查找
	 * @param companyId
	 * @param formCity
	 * @param toCity
	 * @param date
	 * @param page
	 * @param pagesize
	 * @return
	 */
	public List<OccupRateEntityVO> findOccupRateByCode(
			String companyId,String formCity,String toCity,Date date,int page,int pagesize);
	
	
}
